[SOLVED]{"Object type 'cms.class' not found."}

Zalizan Zolkipali asked on April 13, 2017 16:21

EDIT: Forgot to put CMS.DataEngine.CMSApplication.Init(); in Main method. Solved

Hi, I've got an error {"Object type 'cms.class' not found."} when i run my c# console application in visual studio 2017. This application used to extract data from kentico db, process and then insert into kentico custom tables. When debug, I found this error occurred when it reached DataClassInfo customTable = DataClassInfoProvider.GetDataClassInfo(customTableClassName);. I already add kentico API reference as instructed in this link: https://docs.kentico.com/k10/integrating-3rd-party-systems/using-the-kentico-api-externally. Not having this issue in Kentico 8.2. Below are the detail of the error:

   at CMS.DataEngine.ObjectQueryBase`2.get_Object()
   at CMS.DataEngine.ObjectQueryBase`2.get_TypeInfo()
   at CMS.DataEngine.ObjectQueryBase`2.GetData()
   at CMS.DataEngine.DataQueryBase`1.get_Result()
   at CMS.DataEngine.DataClassInfoProvider.GetClassStructureInfoFromDB(String className)
   at CMS.DataEngine.ClassStructureInfo.GetClassInfo(String className)
   at CMS.DataEngine.ObjectTypeInfo.get_ClassStructureInfo()
   at CMS.DataEngine.AbstractInfoBase`1.EnsureData(Boolean loadDefault, Boolean applyTypeCondition)
   at CMS.DataEngine.AbstractInfoBase`1.get_DataClass()
   at CMS.DataEngine.AbstractInfoBase`1.ItemChanged(String columnName)
   at CMS.DataEngine.AbstractInfoBase`1.TryGetValue(String columnName, Object& value)
   at CMS.DataEngine.AbstractInfoBase`1.GetValue(String columnName)
   at CMS.DataEngine.DataClassInfoBase`1.get_ClassShowAsSystemTable()
   at CMS.DataEngine.DataClassInfo.get_TypeInfo()
   at CMS.DataEngine.BaseInfo.CheckLicense(ObjectActionEnum action, String domainName)
   at CMS.DataEngine.BaseInfo.GeneralizedInfoWrapper.CheckLicense(ObjectActionEnum action, String domainName)
   at CMS.DataEngine.AbstractInfoProvider`3.GetObjectQuery(Boolean checkLicense)
   at CMS.DataEngine.AbstractInfoProvider`3.GetDataByColumn[T](String columnName, T value, String columns)
   at CMS.DataEngine.AbstractInfoProvider`3.GetInfoByColumn[T](String columnName, T value)
   at CMS.DataEngine.AbstractInfoProvider`3.GetInfoByCodeName(String codeName, Boolean useHashtable)
   at CMS.DataEngine.DataClassInfoProviderBase`1.GetDataClassInfoInternal(String name)
   at CMS.DataEngine.DataClassInfoProviderBase`1.GetDataClassInfo(String name)
   at InstantArticleV3.Program.Main(String[] args) in D:\InstantArticleV3\InstantArticleV3\Program.cs:line 265

   Please, sign in to be able to submit a new answer.